Skip to content

refactor: misc code quality improvements#6

Merged
zoispag merged 2 commits intomasterfrom
refactor/misc-improvements
Apr 6, 2026
Merged

refactor: misc code quality improvements#6
zoispag merged 2 commits intomasterfrom
refactor/misc-improvements

Conversation

@zoispag
Copy link
Copy Markdown
Owner

@zoispag zoispag commented Apr 6, 2026

Changes

  • pep518.go: replace deprecated ioutil.ReadFile with os.ReadFile (safe now that we're on Go 1.26)
  • pep518.go: replace panic with log.Error + early return when pyproject.toml can't be read — consistent with the rest of the codebase
  • poetry.go: fix longstanding CWD-relative bug — fileExists("poetry.toml")fileExists(filepath.Join(path, "poetry.toml")), so it correctly checks the project directory rather than the process CWD
  • run.go: ExecutePython now delegates to GetPythonRunCommand instead of duplicating the same logic; drop redundant else after early return
  • All handlers: simplify log.Error(fmt.Sprintf("%s", err.Error()))log.Error(err.Error())err.Error() already returns a string
  • go mod tidy: clean up go.sum

Verification

  • go build ./...
  • go vet ./...
  • go test -v -timeout 120s ./python/ -run TestE2E — all 4 pass ✅

zoispag added 2 commits April 6, 2026 23:29
- pep518.go: replace deprecated ioutil.ReadFile with os.ReadFile
- pep518.go: replace panic with log.Error + early return on read failure
- poetry.go: fix CWD-relative fileExists bug (filepath.Join path+poetry.toml)
- run.go: ExecutePython delegates to GetPythonRunCommand; drop redundant else
- uv/pipenv/pip/poetry.go: simplify log.Error(fmt.Sprintf("%s", err.Error())) to log.Error(err.Error())
- go mod tidy
@zoispag zoispag merged commit 139325f into master Apr 6, 2026
7 checks passed
@zoispag zoispag deleted the refactor/misc-improvements branch April 6, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant